// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.highlighting.highlighters

import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KaFirDiagnostic
import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KaFirDiagnostic.*
import kotlin.reflect.KClass

/*
    We assume all diagnostics suppressable during incomplete mode, except of these:
 */
val ignoreIncompleteModeDiagnostics: Set<KClass<out KaFirDiagnostic<out PsiElement>>> = setOf(
    ValReassignment::class,
    ValReassignmentViaBackingFieldError::class,
    ValReassignmentViaBackingFieldWarning::class,
    MissingConstructorKeyword::class,
    NoConstructor::class,
    InnerClassConstructorNoReceiver::class,
    SelfCallInNestedObjectConstructorError::class,
    ConstructorInObject::class,
    ConstructorInInterface::class,
    NonPrivateConstructorInEnum::class,
    CyclicConstructorDelegationCall::class,
    PrimaryConstructorDelegationCallExpected::class,
    ProtectedConstructorNotInSuperCall::class,
    SupertypeInitializedWithoutPrimaryConstructor::class,
    DelegationSuperCallInEnumConstructor::class,
    SealedClassConstructorCall::class,
    AnnotationClassConstructorCall::class,
    EnumClassConstructorCall::class,
    ExposedPropertyTypeInConstructorError::class,
    ExposedPropertyTypeInConstructorWarning::class,
    OperatorCallOnConstructor::class,
    AbsenceOfPrimaryConstructorForValueClass::class,
    InlineClassConstructorWrongParametersSize::class,
    ValueClassEmptyConstructor::class,
    ValueClassConstructorNotFinalReadOnlyParameter::class,
    MultiFieldValueClassPrimaryConstructorDefaultParameter::class,
    SecondaryConstructorWithBodyInsideValueClass::class,
    CallableReferenceToAnnotationConstructor::class,
    ExpectedClassConstructorDelegationCall::class,
    ExpectedClassConstructorPropertyParameter::class,
    ExpectedEnumConstructor::class,
    ConstructorOrSupertypeOnTypealiasWithTypeProjectionError::class,
    ConstructorOrSupertypeOnTypealiasWithTypeProjectionWarning::class,
    ProtectedConstructorCallFromPublicInline::class,
    JvmRecordWithoutPrimaryConstructorParameters::class,
    JavaSamInterfaceConstructorReference::class,
    ExternalClassConstructorPropertyParameter::class,
    ExternalDelegatedConstructorCall::class,
    IllegalConstExpression::class,
    AnnotationArgumentMustBeConst::class,
    AnnotationArgumentMustBeEnumConst::class,
    AnnotationParameterDefaultValueMustBeConstant::class,
    NonConstValUsedInConstantExpression::class,
    ConstValNotTopLevelOrObject::class,
    ConstValWithGetter::class,
    ConstValWithDelegate::class,
    TypeCantBeUsedForConstVal::class,
    ConstValWithoutInitializer::class,
    ConstValWithNonConstInitializer::class,
    JvmStaticOnConstOrJvmField::class,
    Redeclaration::class,
    ClassifierRedeclaration::class,
    InitializationBeforeDeclaration::class,
    RedundantVisibilityModifier::class,
    RedundantModalityModifier::class,
    IllegalInlineParameterModifier::class,
    NonModifierFormForBuiltInSuspend::class,
    ModifierFormForNonBuiltInSuspend::class,
    ModifierFormForNonBuiltInSuspendFunError::class,
    ModifierFormForNonBuiltInSuspendFunWarning::class,
    RepeatedModifier::class,
    RedundantModifier::class,
    DeprecatedModifier::class,
    DeprecatedModifierPair::class,
    DeprecatedModifierContainingDeclaration::class,
    DeprecatedModifierForTarget::class,
    IncompatibleModifiers::class,
    WrongModifierTarget::class,
    InfixModifierRequired::class,
    WrongModifierContainingDeclaration::class,
    InapplicableLateinitModifier::class,
    CannotWeakenAccessPrivilege::class,
    CannotWeakenAccessPrivilegeWarning::class,
    AbstractPropertyInNonAbstractClass::class,
    PrivateSetterForAbstractProperty::class,
    PrivateSetterForOpenProperty::class,
    GetterVisibilityDiffersFromPropertyVisibility::class,
    SetterVisibilityInconsistentWithPropertyVisibility::class,
    ExpectedLateinitProperty::class,
    ExpectedPrivateDeclaration::class,
    ExpectedExternalDeclaration::class,
    ExpectedTailrecFunction::class,
)